<template>
  <h2>vant组件的使用</h2>
  <van-button type="primary" @click="toDetail">跳转到详情页</van-button>
  <van-grid :column-num="4" clickable>
    <van-grid-item v-for="(item, index) in userList" :key="index">
      <div class="inner-box">
        <van-image :src="item.avatar_url" />
      </div>
    </van-grid-item>
  </van-grid>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: ['userList'],
  methods: {
    toDetail() {
      console.log(this.$router.push('/about'))
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
</style>
